require(['config'], function() {
	require(['zepto', 'resize', 'swiper', 'swiper.animate', 'diqu','zepto-touch'], function($, resize, swiper, swiperanimate, ditu,touch) {
		$(function() {
			var mySwiper = new Swiper('.swiper-container', {
				loop: true,
				centeredSlides: true,
				autoplayDisableOnInteraction: true,
				// 如果需要分页器
				pagination: '.swiper-pagination',
				paginationType: 'true',
				autoplay: 5000,
				onInit: function(swiper) { //Swiper2.x的初始化是onFirstInit
					swiperAnimateCache(swiper); //隐藏动画元素 
					swiperAnimate(swiper); //初始化完成开始动画
				},
				onSlideChangeEnd: function(swiper) {
					swiperAnimate(swiper); //每个slide切换结束时也运行当前slide动画
				}
			});
			if($("select[name='sheng']").length > 0) {
				new PCAS("sheng", "shi", "qu", "", "", "");
			}
			$('input[name=address-options]').change(function() {
				if($(this).val() == 0) {
					$('#addressform').show();
				} else {
					$('#addressform').hide();
				}
			});
			$(".ifvoicenot").on("click", function() {
				$(this).parent().next().toggle();
			});
			$('.clearcart').tap(function(){
				$('.cart-list').find('li').each(function(){
					$(this).remove()
				});
			});
		});
	});
});
